package com.xomily.devops.service.impl;

import java.util.List;
import com.xomily.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.xomily.devops.mapper.DevProgramMapper;
import com.xomily.devops.domain.DevProgram;
import com.xomily.devops.service.IDevProgramService;

/**
 * 进程信息Service业务层处理
 * 
 * @author xomily
 * @date 2021-11-29
 */
@Service
public class DevProgramServiceImpl implements IDevProgramService 
{
    @Autowired
    private DevProgramMapper devProgramMapper;

    /**
     * 查询进程信息
     * 
     * @param id 进程信息主键
     * @return 进程信息
     */
    @Override
    public DevProgram selectDevProgramById(Long id)
    {
        return devProgramMapper.selectDevProgramById(id);
    }

    /**
     * 查询进程信息列表
     * 
     * @param devProgram 进程信息
     * @return 进程信息
     */
    @Override
    public List<DevProgram> selectDevProgramList(DevProgram devProgram)
    {
        return devProgramMapper.selectDevProgramList(devProgram);
    }

    /**
     * 新增进程信息
     * 
     * @param devProgram 进程信息
     * @return 结果
     */
    @Override
    public int insertDevProgram(DevProgram devProgram)
    {
        devProgram.setCreateTime(DateUtils.getNowDate());
        return devProgramMapper.insertDevProgram(devProgram);
    }

    /**
     * 修改进程信息
     * 
     * @param devProgram 进程信息
     * @return 结果
     */
    @Override
    public int updateDevProgram(DevProgram devProgram)
    {
        devProgram.setUpdateTime(DateUtils.getNowDate());
        return devProgramMapper.updateDevProgram(devProgram);
    }

    /**
     * 批量删除进程信息
     * 
     * @param ids 需要删除的进程信息主键
     * @return 结果
     */
    @Override
    public int deleteDevProgramByIds(Long[] ids)
    {
        return devProgramMapper.deleteDevProgramByIds(ids);
    }

    /**
     * 删除进程信息信息
     * 
     * @param id 进程信息主键
     * @return 结果
     */
    @Override
    public int deleteDevProgramById(Long id)
    {
        return devProgramMapper.deleteDevProgramById(id);
    }
}
